<template>
  <div>
    <h2>{{ counter }}</h2>
    <AddButton @one="counter++" @hundred="counter += 100" @30="add"></AddButton>
  </div>
</template>

<script>
import AddButton from './components/AddButton.vue'
export default {
  data() {
    return {
      counter: 200
    }
  },
  components: {
    AddButton
  },
  methods: {
    add(n) {
      this.counter += n;
    }
  }
}
</script>

<style scoped>

</style>